-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Inline deep #3316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline deep #3316
Conversation
We can currently not test the performance of this change on the benchmark server. @liufengyun will work on some changes that will make this possible. |
Other interesting inlining data for methods too big to inline https://gist.github.com/nicolasstucki/e239b7d331aa152c75259b4273f75201. Unfortunately nothing close to 35 bytes. |
I would try MaxInlineLevel=18 too. |
@@ -37,7 +37,7 @@ object Bench { | |||
val libs = System.getProperty("BENCH_CLASS_PATH") | |||
|
|||
val opts = new OptionsBuilder() | |||
.jvmArgsPrepend("-Xbootclasspath/a:" + libs + ":", "-Xms2G", "-Xmx2G") | |||
.jvmArgsPrepend("-Xbootclasspath/a:" + libs + ":", "-Xms2G", "-Xmx2G", "-XX:MaxInlineLevel=35") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine for testing but we shouldn't merge this since it doesn't reflect what 99% of people using dotty through sbt will get.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I there a way to add this to sbt?
|
I assume you're aware, but for the benefit of others reading this, it is worth noting that that 35 byte threshold ( From your examples:
...would have been eligible for inlining if it were smaller than 325 bytecodes. If the message is just "too big", it means it wasn't a hot call site, and the callee would need to be <= 35 bytes to be inlined.
|
@retronym, I aware of the other flags but I have not tried them all yet. I tried |
8a34c71
to
552dbcf
Compare
Methods that cannot be inlined due to depth (compiling dotty 30 times in a loop):
XX:MaxInlineLevel=9
list of 20362 methodsXX:MaxInlineLevel=35
list of 3015 methods, only recursive methods remaining.Collected with
-XX:+UnlockDiagnosticVMOptions -XX:+PrintInlining
Benchmarks with
XX:MaxInlineLevel=9
Benchmarks with
XX:MaxInlineLevel=35
Changing
XX:MaxRecursiveInlineLevel
from 1 (default) to two made the compiler a bit slower.